package com.canbot.u05.view;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.canbot.u05.R;

/**
 * 手持平板 连接失败
 */
public class CenterErrorDialog extends Dialog {

        private Context mContext;

        private Button btn;


        public CenterErrorDialog(Context context) {
                super(context, R.style.MyDialogStyle);
                setCustomDialog();
        }

        private void setCustomDialog() {
                View mView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_centerone, null);
                btn = (Button) mView.findViewById(R.id.reconnection);
                super.setContentView(mView);
        }

        @Override
        public void setContentView(int layoutResID) {
        }

        @Override
        public void setContentView(View view, ViewGroup.LayoutParams params) {
        }

        @Override
        public void setContentView(View view) {
        }


        /**
         * 确定键监听器
         *
         * @param listener
         */
        public void setClickListener(View.OnClickListener listener) {
                btn.setOnClickListener(listener);
        }
}
